package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzAdminMenu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminMenuFeign {

    //修改页面跳转
    @RequestMapping(value = "/admin/menu/service/editAdminMenu/{id}",method = RequestMethod.GET)
    LdbzResult editAdminMenu(@RequestParam("id")long id);

    //分页获取后台管理菜单
    @RequestMapping(value = "/admin/menu/service/getAdminMenuPage",method = RequestMethod.GET)
    LdbzResult getAdminMenuPage(@RequestParam("entity")LdbzAdminMenu entity,@RequestParam("page")int page,@RequestParam("limit")int limit);

    //获取树形菜单
    @RequestMapping(value = "/admin/menu/service/getMenuTree",method = RequestMethod.GET)
    LdbzResult getMenuTree();

    //获取后台管理菜单的详细信息
    @RequestMapping(value = "/admin/menu/service/selectByKey/{id}",method = RequestMethod.GET)
    LdbzResult selectByKey(@RequestParam("id")long id);

    //删除后台管理菜单
    @RequestMapping(value = "/admin/menu/service/deleteByKey/{id}",method = RequestMethod.GET)
    LdbzResult deleteByKey(@RequestParam("id")String id);

    //新增菜单
    @RequestMapping(value = "/admin/menu/service/updateByKey")
    LdbzResult insertByEntity(LdbzAdminMenu entity);

    //修改菜单
    @RequestMapping(value = "/admin/menu/service/updateByKey")
    LdbzResult updateByKey(@RequestParam("entity")LdbzAdminMenu entity);

}
